//package com.dw.listener;
//
//import com.dw.model.message.TestMessage;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.messaging.Message;
//
//import java.util.function.Consumer;
//
//@Configuration
//public class ListenerConfig {
//    @Bean
//    public Consumer<Message<TestMessage>> consumer(){
//        return msg ->{
//            msg.getHeaders().forEach((key, value) -> {
//                System.out.println("Header: " + key + " = " + value);
//            });
//            System.out.println("--------------------------------");
//
//        };
//    }
//
//}
